<template>
    <h1>内联事件处理器3</h1>
    <button @click="addCount">点击</button>
    <p>{{ count }}</p>

    <button @click="addCount2('hello', $event)">点击2</button>
    <p>{{ count2 }}</p>
</template>

<script>
export default {
    data() {
        return {
            count: 0,
            count2: 0
        }
    },
    methods: {
        addCount(e) {
            console.log(e)
            this.count++
        },
        addCount2(msg, event) {
            console.log(msg)
            console.log(event)
            this.count2++
        }
    }
}
</script>